package com.affectu.user;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.ManyToMany;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import com.affectu.common.base.EntityBase;

/**
 * Oct 16, 2008
 * 
 * @author daniel nathan
 */
@Entity
@Name("role")
@Scope(ScopeType.CONVERSATION)
public class Role extends EntityBase {

	private static final long serialVersionUID = 738408375294444239L;

	private int rightValue;

	@ManyToMany(mappedBy = "roles")
	private List<User> users;// 拥有此权限的所有用户

	public int getRightValue() {
		return rightValue;
	}

	public void setRightValue(int rightValue) {
		this.rightValue = rightValue;
	}

	public List<User> getUsers() {
		return users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}
}
